home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / libraries / patchlibv3.lha / patchlibrary / docs / patch.doc next >
Text File  |  1994-06-23  |  24KB  |  683 lines

  1. TABLE OF CONTENTS
  2.  
  3. patch.library/FindPatch
  4. patch.library/FindPatchTagsA
  5. patch.library/GetPatchA
  6. patch.library/InstallPatch
  7. patch.library/InstallPatchTagsA
  8. patch.library/PatchFreeVec
  9. patch.library/RemovePatch
  10. patch.library/RemovePatchTagsA
  11. patch.library/SetPatchA
  12. patch.library/WaitRemovePatch
  13.  
  14. patch.library/FindPatch                               patch.library/FindPatch
  15.  
  16.    NAME
  17.     FindPatch -- find a patch structure with a given name.
  18.  
  19.    SYNOPSIS
  20.     patch = FindPatch( Name )
  21.     D0               A0
  22.  
  23.     struct Patch *FindPatch( STRPTR );
  24.  
  25.    FUNCTION
  26.     This function will search the patch.library lists for a
  27.     patch structure with the given name. The first patch matching
  28.     this name will be returned.
  29.  
  30.     This function exists only for historic reasons.
  31.     It will internally be routed back to FindPatchTags().
  32.    INPUTS
  33.     Name = Name of the patch structure to find
  34.  
  35.    RESULT
  36.     patch = a pointer to the patch structure with the same name else
  37.         zero to indicate that the string was not found.
  38.  
  39.    NOTES
  40.     If your task is not the owner of the patch, the
  41.     pointer is only valid as long as the system is in forbid().
  42.     From V2 on you may also lock the patch.library semaphore
  43.     before calling this function. In this case a pointer to
  44.     a patch structure is guranteed to be valid, until you
  45.     release the semaphore. The semaphore, however, should be kept
  46.     locked only for short periods of time in order not to block
  47.     other tasks.
  48.  
  49.    BUGS
  50.  
  51.    SEE ALSO
  52.     InstallPatch(), RemovePatch(), Patch.h
  53.  
  54. patch.library/FindPatchTagsA                     patch.library/FindPatchTagsA
  55.  
  56.    NAME
  57.     FindPatchTagsA -- find a patch structure with certain criteria. (V3)
  58.     FindPatchTags -- varargs stub for FindPatchTagsA(). (V3)
  59.  
  60.    SYNOPSIS
  61.     patch = FindPatchTagsA( taglist )
  62.     D0                A0
  63.  
  64.     struct Patch *FindPatchTagsA( struct TagItem *);
  65.  
  66.     patch = FindPatchTags( firsttag, ...)
  67.  
  68.     struct Patch *FindPatchTags( Tag, ...);
  69.  
  70.    FUNCTION
  71.     This function will search the patch.library lists for a
  72.     patch structure, that matches the criteria specified in the taglist.
  73.     The first matching patch will be returned.
  74.  
  75.    INPUTS
  76.     taglist = pointer to array of tags
  77.  
  78.    TAGS
  79.     PATT_PatchName (STRPTR) - Specifies that patch.library should
  80.         search for the first occurrance of a patch of the 
  81.         given name.
  82.  
  83.    RESULT
  84.     patch = a pointer to the patch structure or
  85.         zero to indicate that no matching structure was found.
  86.  
  87.    NOTES
  88.     If your task is not the owner of the patch, the
  89.     pointer is only valid as long as the system is in forbid().
  90.     You may also lock the patch.library semaphore
  91.     before calling this function. In this case a pointer to
  92.     a patch structure is guranteed to be valid, until you
  93.     release the semaphore. The semaphore, however, should be kept
  94.     locked only for short periods of time in order not to block
  95.     other tasks.
  96.  
  97.    BUGS
  98.     Currently (V3) there is only one public tag available.
  99.  
  100.    SEE ALSO
  101.     InstallPatchTags(), RemovePatchTags(), PatchTags.h
  102.  
  103. patch.library/GetPatchA                               patch.library/GetPatchA
  104.  
  105.    NAME
  106.     GetPatchA -- Changes certain attributes of a patch. (V3)
  107.     GetPatch -- varargs stub for GetPatchA(). (V3)
  108.  
  109.    SYNOPSIS
  110.     Result = GetPatchA( patch, taglist )
  111.     D0                A0     A1
  112.  
  113.     ULONG Result GetPatchA( struct Patch *, struct TagItem *);
  114.  
  115.     Result = GetPatch( patch, firsttag, ...)
  116.  
  117.     ULONG Result GetPatch( struct Patch *, Tag, ...);
  118.  
  119.    FUNCTION
  120.     Returns certain attributes and lists connected to a patch (see TAGS).
  121.  
  122.    INPUTS
  123.     patch = pointer to a patch structure or NULL for no action
  124.     taglist = pointer to array of tags
  125.  
  126.    TAGS
  127.     PATT_Result2 (APTR) - An optional pointer to a longword, which will
  128.         contain an errorcode as defined patch.h, when
  129.         the function returns.
  130.         Assembler programmers can get the same value from d1.
  131.  
  132.     Only one of the following tags may be specified at a time:
  133.  
  134.     PATT_PatchName (BOOL) - Return a pointer to a copy of the name of
  135.         the patch in a null-terminated string.
  136.         This pointer must be passed to PatchFreeVec(), if
  137.         the string is no longer needed.
  138.         Type of Result is STRPTR.
  139.     PATT_TaskListType (BOOL) - Return the type of the internal TaskList
  140.         Possible results:
  141.         TL_TYPE_INCLUDE: all specified tasks will use the patchroutine,
  142.                  all others will ignore it.
  143.         TL_TYPE_EXCLUDE: all specified tasks will ignore the patchroutine,
  144.                  all others will use it.
  145.         NULL:         An error occured (this includes the absense of
  146.                  a TaskList). Check the secondary errorcode for
  147.                  more information.
  148.         Type of Result is ULONG.
  149.     PATT_TaskList (BOOL) - Return a pointer to a taglist containing all
  150.         tasknames and taskids attached to patch. The tagitems are either
  151.         PATT_AddTaskName or PATT_AddTaskID.
  152.         This pointer must be passed to PatchFreeVec(), if
  153.         the tasklist is no longer needed.
  154.         Type of Result is taglist.
  155.  
  156.    RESULT
  157.     Result = Pointer or longword depending on specified tags.
  158.          A result of zero indicates an error.
  159.  
  160.     Errorcodes returned with PATT_Result2 or in register d1:
  161.         PATERR_Ok
  162.             Indicates success of the operation.
  163.         PATERR_OutOfMem
  164.             Indicates that there was not enough memory to
  165.             complete the operation.
  166.         PATERR_InvalidHandle
  167.             Indicates that the pointer to the patch passed
  168.             to the function was not or is no longer valid.
  169.             This might happen, if you pass a wrong pointer or
  170.             you got the pointer via FindPatch() and another
  171.             task has removed the patch before this task called
  172.             RemovePatchTags().
  173.         PATERR_NoTaskList
  174.             No valid TaskList is attached to the patch.
  175.             The SetPatchA() function with the PATT_CreateTaskList tag
  176.             specified, must be called to allocate a TaskList.
  177.         PATERR_PatchUnnamed
  178.             The patch has no identification string attached to it.
  179.  
  180.    NOTES
  181.  
  182.    BUGS
  183.  
  184.    SEE ALSO
  185.     InstallPatchTags(), PatchFreeVec(), Patch.h, PatchTags.h
  186. patch.library/InstallPatch                         patch.library/InstallPatch
  187.  
  188.    NAME
  189.     InstallPatch -- Installs a patchroutine for library functions.
  190.  
  191.    SYNOPSIS
  192.     patch = InstallPatch( newPatch )
  193.     D0              A0
  194.  
  195.     struct Patch *InstallPatch( struct NewPatch * );
  196.  
  197.    FUNCTION
  198.     Opens a library and installs a user provided routine to a library
  199.     function.
  200.  
  201.     Before you call InstallPatch(), you must initialize an instance of
  202.     a NewPatch structure.  NewPatch is a structure that contains
  203.     all of the arguments needed to install a patch.  The NewPatch
  204.     structure may be discarded immediately after it is used to install
  205.     the patch.
  206.  
  207.     This function exists only for historic reasons. It will internally
  208.     routed back to InstallPatchTags(). Because InstallPatchTags()
  209.     has advanced features there is definitely no need to call this
  210.     function at all.
  211.  
  212.    INPUTS
  213.     NewPatch = pointer to an instance of a NewPatch structure
  214.               containing the following fields
  215.  
  216.         NPAT_NewCode:
  217.             Pointer to the patch code to be installed.
  218.             If NPAT_PRI is >= 0 then your patch code gets all
  219.             registers set to the same values as the program
  220.             that called the function.
  221.             If NPAT_PRI is < 0 then your patch code gets all
  222.             registers set to the same values as the library
  223.             function returned them.
  224.             It is up to the patch code to keep the registers
  225.             intact, when it returns with 'rts'.
  226.             Due to the internal implementation of the patches,
  227.             library functions patched with patch.library
  228.             require four bytes more stack.  This might cause in
  229.             very rare cases crashes due to stack overflow.
  230.         NPAT_NewCodeSize:
  231.             Optional length of the patch code to be installed.
  232.             If this field is set to the correct value
  233.             the PC-RELATIVE patch code starting at NPAT_NewCode
  234.             will be copied to an internal Buffer.
  235.             So it is possible to deallocate the patch code
  236.             after InstallPatch returns.
  237.         NPAT_LibraryName:
  238.             Pointer to the name of the library, which contains
  239.             the function to patch.
  240.             ( as in exec.library/OpenLibrary() )
  241.         NPAT_LibVersion:
  242.             version of the Library to open should be specified,
  243.             if a function is available only from a certain
  244.             library version on.
  245.             ( as in exec.library/OpenLibrary() )
  246.         NPAT_LVO:
  247.             Library Offset Vector (LVO) of the function to patch
  248.         NPAT_Priority:
  249.             Priority of the patch
  250.             valid range: -127...+126
  251.             It indicates the sequence of patches, if
  252.             more than one patch for a function is installed.
  253.             The original code has a priority of 0.
  254.             Priority:    Meaning:
  255.             >0: patch will be executed before the original
  256.             <0: patch will be executed after the original
  257.             =0: patch will be executed instead of the original
  258.         NPAT_Flags:
  259.             No flags are used and this field will be ignored
  260.             ( keep zero )
  261.         NPAT_PatchName:
  262.             An optional pointer to a string, which can be used
  263.             to search for a patch with FindPatch().
  264.             The null-terminated string will be copied, so you
  265.             may free its memory when InstallPatch() returns.
  266.             The string should identify the program that installed
  267.             the patch.
  268.         NPAT_Result2:
  269.             An optional pointer to a longword, which will contain
  270.             an errorcode as defined later. Assembler programmers
  271.             can always find this in d1, too.
  272.  
  273.    RESULT
  274.     patch = pointer to a Patch structure or NULL on failure
  275.  
  276.     for informations about the errorcodes see RemovePatchTags()
  277.  
  278.    NOTES
  279.  
  280.    BUGS
  281.  
  282.    SEE ALSO
  283.     InstallPatchTags()
  284.  
  285. patch.library/InstallPatchTagsA               patch.library/InstallPatchTagsA
  286.  
  287.    NAME
  288.     InstallPatchTagsA -- Installs a patchcode for library functions. (V2)
  289.     InstallPatchTags -- varargs stub for InstallPatchTagsA(). (V2)
  290.  
  291.    SYNOPSIS
  292.     patch = InstallPatchTagsA( funcEntry, funcOffset, tagList )
  293.     D0                    A0         D0          A1
  294.  
  295.     struct Patch *InstallPatchTagsA( APTR, UWORD, struct TagItem * );
  296.  
  297.     patch = InstallPatchTags( funcEntry, funcOffset, firsttag, ...)
  298.  
  299.     struct Patch *InstallPatchTags( APTR, UWORD, Tag, ...);
  300.  
  301.    FUNCTION
  302.     Adds a user provided routine to a library function.
  303.  
  304.     NEW for V3: An internal call to SetPatch() will be made.
  305.     So all tags which are valid with SetPatch() may be specified in the
  306.     taglist.
  307.  
  308.    INPUTS
  309.     funcEntry = pointer to the entry of the function to add
  310.     funcOffset = Library Offset Vector (LVO) of the function to patch
  311.     taglist = pointer to array of tags
  312.  
  313.    TAGS
  314.     PATT_LibraryName (STRPTR) - Specifies that you want to patch a library
  315.         of the given name ( as in exec.library/OpenLibrary() ).
  316.         Either PATT_LibraryName, PATT_DeviceName or PATT_LibraryBase
  317.         MUST be specified.
  318.     PATT_DeviceName (STRPTR) - Specifies that you want to patch a device
  319.         of the given name ( as in exec.library/OpenDevice() ).
  320.         Either PATT_LibraryName, PATT_DeviceName or PATT_LibraryBase
  321.         MUST be specified.
  322.     PATT_LibraryBase (struct Library *) Specifies that you want to patch
  323.         a library, device or resource with the given base.
  324.         You may get such a pointer by calling one of the following
  325.         exec functions: OpenLibrary(), OpenDevice(), OpenResource()
  326.         You may safely close this library, if InstallPatchTags()
  327.         returns, because patch.library will increase the OpenCount
  328.         to make sure, that the library won't be removed from the
  329.         system as long as there are patches installed.
  330.         Either PATT_LibraryName, PATT_DeviceName or PATT_LibraryBase
  331.         MUST be specified.
  332.     PATT_LibVersion (ULONG) - Versionnumber for exec.library/OpenLibrary.
  333.         Optional in conjunction with PATT_LibraryName.
  334.         Should be specified, if a function is available only
  335.         from a certain library version on.
  336.         Default is NULL (any version).
  337.     PATT_DevFlags (ULONG) - Flags for exec.library/OpenDevice().
  338.         Optional in conjunction with PATT_DeviceName. Default is NULL.
  339.     PATT_DevUnit (ULONG) - Unit for exec.library/OpenDevice().
  340.         Optional in conjunction with PATT_DeviceName. Default is NULL.
  341.     PATT_PatchName (STRPTR) - An optional pointer to a string, which can
  342.         be used to search for a patch with FindPatch() or FindPatchTags().
  343.         The null-terminated string will be copied, so you may free
  344.         its memory when InstallPatchTags() returns. The string should
  345.         identify the program that installed the patch.
  346.         Even though this tag is optional, the use of it is strongly
  347.         encouraged, because without it certain future enhancements
  348.         of the patch.library may not work (e.g.: saving of user-settings).
  349.     PATT_Priority (BYTE) - Priority of the patch
  350.         valid range: -127...+126
  351.         It indicates the sequence of patches, if more than one patch
  352.         for a function is to be installed.
  353.         The original code has a priority of 0.
  354.         Priority:    Meaning:
  355.         >0: patch will be executed before the original
  356.         <0: patch will be executed after the original
  357.         =0: patch will be executed instead of the original (default)
  358.         Normally only the priorities +5, 0, -5 should be used.
  359.     PATT_NewCodeSize (ULONG) - Optional length of the patch code to be
  360.         installed.
  361.         If this field is set to the correct value the PC-RELATIVE
  362.         patch code starting at funcEntry will be copied into an
  363.         internal Buffer. So it is possible to deallocate the
  364.         patch code after InstallPatchTags() returned.
  365.     PATT_Result2 (APTR) - An optional pointer to a longword, which will
  366.         contain an errorcode as defined patch.h, when
  367.         the function returns.
  368.         Assembler programmers can get the same value from d1.
  369.     For more tags see the description of SetPatch().
  370.  
  371.    RESULT
  372.     patch = pointer to a Patch structure or NULL on failure
  373.  
  374.     Errorcodes returned with PATT_Result2, NPAT_Result2 or in register d1:
  375.     Note that from V3 on errorcodes may be returned, even if patch is a
  376.     valid pointer, indicating a failure in the internal SetPatch() call.
  377.     Previous versions always set PATERR_Ok, if patch is a valid pointer.
  378.         PATERR_Ok
  379.             Indicates success of the operation.
  380.         PATERR_OutOfMem
  381.             Indicates that there was not enough memory to
  382.             complete the operation.
  383.         PATERR_OpenLib
  384.             The operation failed, because the exec.library
  385.             function OpenLibrary() failed. Check the Autodocs
  386.             for more informations about OpenLibrary().
  387.         PATERR_OpenDev
  388.             The operation failed, because the exec.library
  389.             function OpenDevice() failed. Check the Autodocs
  390.             for more informations about OpenDevice().
  391.         PATERR_FuncNotStd
  392.             The library offset vector of the function to patch
  393.             was not in format that patch-library can accept.
  394.             Patch.library can handle the following formats:
  395.             jmp xxxxxx
  396.             moveq.l #xx,Dx    bra.l xxxx
  397.             moveq.l #xx,Dx    bra.s xx
  398.             Note that this is the type of error returned,
  399.             if you are trying to patch a function that uses
  400.             inline code such as the exec.library/GetCC() function.
  401.         PATERR_InvalidTags
  402.             An error occured while parsing the specified Tags
  403.             (e.g.: EITHER PATT_LibraryName, PATT_DeviceName or
  404.             PATT_LibraryBase MUST be used with InstallPatchTags() )
  405.     For more errorcodes see the description of SetPatch().
  406.  
  407.    NOTES
  408.  
  409.    BUGS
  410.  
  411.    SEE ALSO
  412.     RemovePatchTags(), SetPatch(), Patch.h, PatchTags.h,
  413.     exec.library/OpenLibrary(), exec.library/OpenDevice()
  414. patch.library/PatchFreeVec                         patch.library/PatchFreeVec
  415.  
  416.    NAME
  417.     PatchFreeVec -- free memory allocated by GetPatch() (V3)
  418.  
  419.    SYNOPSIS
  420.     PatchFreeVec(memoryBlock)
  421.              A1
  422.  
  423.     void PatchFreeVec(void *);
  424.  
  425.    FUNCTION
  426.     Free a memory allocation made by the GetPatch() call. The memory will
  427.     be returned to the system pool from which it came.
  428.  
  429.    NOTE
  430.  
  431.    INPUTS
  432.     memoryBlock - pointer to the memory block to free, or NULL.
  433.  
  434.    SEE ALSO
  435.     GetPatch(), exec.library/FreeVec
  436. patch.library/RemovePatch                           patch.library/RemovePatch
  437.  
  438.    NAME
  439.     RemovePatch -- Removes a patch installed by InstallPatch().
  440.  
  441.    SYNOPSIS
  442.     Error = RemovePatch( patch )
  443.     D0                 A0
  444.  
  445.     ULONG Error RemovePatch( struct Patch * );
  446.  
  447.    FUNCTION
  448.     This function is obsolete from V2 on, use RemovePatchTags() instead.
  449.     It effectively calls the new function
  450.     RemovePatchTags(patch, PATT_DelayedExpunge, FALSE)
  451.  
  452.    INPUTS
  453.     patch = pointer to the patch structure or NULL for no action
  454.  
  455.    RESULT
  456.     Error = Errorcodes as defined in Patch.h.
  457.         (for more information see RemovePatchTags() )
  458.  
  459.    NOTES
  460.     Removing a patch routine can never be made absolutely save.
  461.     Although patch.library does anything possible to provide methods
  462.     to minimize the chance of a crash, there will always be a
  463.     slight chance.
  464.     So minimize the number of install and remove operations.
  465.  
  466.    BUGS
  467.  
  468.    SEE ALSO
  469.     RemovePatchTags(), Patch.h
  470.  
  471. patch.library/RemovePatchTagsA                 patch.library/RemovePatchTagsA
  472.  
  473.    NAME
  474.     RemovePatchTagsA -- Removes an installed patch. (V2)
  475.     RemovePatchTags -- varargs stub for RemovePatchTagsA(). (V2)
  476.  
  477.    SYNOPSIS
  478.     Error = RemovePatchTagsA( patch, taglist )
  479.     D0                      A0     A1
  480.  
  481.     ULONG Error RemovePatchTagsA( struct Patch *, struct TagItem *);
  482.  
  483.     Error = RemovePatchTags( patch, firsttag, ...)
  484.  
  485.     ULONG Error RemovePatchTags( struct Patch *, Tag, ...);
  486.  
  487.    FUNCTION
  488.     Removes a patch from a library function.
  489.  
  490.     All allocated resources for that specific patch will
  491.     be deallocated.
  492.  
  493.    INPUTS
  494.     patch = pointer to a patch structure or NULL for no action
  495.     taglist = pointer to array of tags
  496.  
  497.    TAGS
  498.     PATT_TimeOut (ULONG) - The number of ticks (1/50 seconds) the
  499.         function keeps trying to remove the patch, if another task
  500.         is running in the patchcode.
  501.         If the patch.library does not succeed in the given time the
  502.         function will return PATERR_PatchInUse.
  503.         Defaults to NULL, which means no retry.
  504.     PATT_DelayedExpunge (BOOL) - If this tag is not set to FALSE and a
  505.         non-patch.library patch was installed after the patch.library
  506.         patch for a specific library function the specified patch
  507.         will nevertheless be removed.
  508.         BUT some resources will be kept allocated by patch.library
  509.         (e.g.: the Library Offset Vector will not be restored to its
  510.         old state). Patch.library will try to deallocate these
  511.         resources automatically, if the system is getting low on
  512.         memory or if a call to a patch.library function that
  513.         removes or installs patches is made.
  514.         The default is TRUE !!!
  515.  
  516.    RESULT
  517.     Error = Errorcodes as defined in Patch.h.
  518.         PATERR_Ok
  519.             Indicates success of the operation.
  520.         PATERR_PatchInUse
  521.             Indicates that some other task is using the
  522.             installed function and the patch can't be removed now.
  523.             Your task may wait and try again later.
  524.         PATERR_PatchInstalled
  525.             Indicates that a patchcode has been installed for
  526.             that function after your patch.library patch has
  527.             been installed and your patch is the only
  528.             patch.library patch for that function.
  529.             If patch.library would remove your patch
  530.             tasks would jump into deallocated memory
  531.             Result:  blinking borders.
  532.             Never occurs, if you pass in the tag
  533.             PATT_DelayedExpunge with TRUE.
  534.         PATERR_InvalidHandle
  535.             Indicates that the pointer to the patch passed
  536.             to the function was not or is no longer valid.
  537.             This might happen, if you pass a wrong pointer or
  538.             you got the pointer via FindPatch() and another
  539.             task has removed the patch before this task called
  540.             RemovePatchTags().
  541.             Also keep in mind that ln_Type must be PS_TYPE_USER.
  542.  
  543.    NOTES
  544.     Removing a patch routine can never be made absolutely save.
  545.     Although patch.library does anything possible to provide methods
  546.     to minimize the chance of a crash, there will always be a
  547.     slight chance.
  548.     So minimize the number of install and remove operations.
  549.  
  550.    BUGS
  551.  
  552.    SEE ALSO
  553.     InstallPatchTags(), Patch.h, PatchTags.h
  554. patch.library/SetPatchA                               patch.library/SetPatchA
  555.  
  556.    NAME
  557.     SetPatchA -- Changes certain attributes of a patch. (V3)
  558.     SetPatch -- varargs stub for SetPatchA(). (V3)
  559.  
  560.    SYNOPSIS
  561.     Error = SetPatchA( patch, taglist )
  562.     D0               A0     A1
  563.  
  564.     ULONG Error SetPatchA( struct Patch *, struct TagItem *);
  565.  
  566.     Error = SetPatch( patch, firsttag, ...)
  567.  
  568.     ULONG Error SetPatch( struct Patch *, Tag, ...);
  569.  
  570.    FUNCTION
  571.     Changes certain attributes of a patch (see TAGS).
  572.  
  573.    INPUTS
  574.     patch = pointer to a patch structure or NULL for no action
  575.     taglist = pointer to array of tags
  576.  
  577.    TAGS
  578.     PATT_CreateTaskList (ULONG) - Create a TaskList of the given type:
  579.         TL_TYPE_INCLUDE: all specified tasks will use the patchroutine,
  580.                  all others will ignore it.
  581.                  So if no Task is specified via PATT_AddTask... tags,
  582.                  the patchroutine will be used for NO tasks!
  583.         TL_TYPE_EXCLUDE: all specified tasks will ignore the patchroutine,
  584.                  all others will use it.
  585.                  So if no Task is specified via PATT_AddTask... tags,
  586.                  the patchroutine will be used for ALL tasks!
  587.     PATT_DeleteTaskList (BOOL) - Delete any exisiting TaskList
  588.         This will return the patch to its default behaviour, which is to call
  589.         the patchroutine for any task.
  590.         It is not required to remove the TaskList, before you remove a patch,
  591.         (via RemovePatchTags()) because this will automatically be done
  592.         by patch.library.
  593.     PATT_AddTaskID (struct Task *) - Add a task address to the patch TaskList.
  594.         Patch.library takes care that one TaskID appears only once in the
  595.         TaskList.
  596.         Unlike many tags, you may specify this tag more than once in one
  597.         taglist to add multiple tasks to the list.
  598.     PATT_AddTaskName (STRPTR) - Add a task of the given name to address to the
  599.         patch TaskList. The string will be copied into an internal buffer.
  600.         Patch.library takes care that one TaskName appears only once in the
  601.         TaskList.
  602.         Unlike many tags, you may specify this tag more than once in one
  603.         taglist to add multiple tasks to the list.
  604.     PATT_RemTaskID (struct Task *) - Remove a task address from the patch TaskList
  605.         Unlike many tags, you may specify this tag more than once in one
  606.         taglist to remove multiple tasks to the list.
  607.     PATT_RemTaskName (APTR) - Remove a task of the given name to address from the
  608.         patch TaskList.
  609.         Unlike many tags, you may specify this tag more than once in one
  610.         taglist to remove multiple tasks to the list.
  611.  
  612.    RESULT
  613.     Error = Errorcodes as defined in Patch.h.
  614.         PATERR_Ok
  615.             Indicates success of the operation.
  616.         PATERR_OutOfMem
  617.             Indicates that there was not enough memory to
  618.             complete the operation.
  619.         PATERR_InvalidHandle
  620.             Indicates that the pointer to the patch passed
  621.             to the function was not or is no longer valid.
  622.             This might happen, if you pass a wrong pointer or
  623.             you got the pointer via FindPatch() and another
  624.             task has removed the patch before this task called
  625.             RemovePatchTags().
  626.         PATERR_NoTaskList
  627.             No valid TaskList is attached to the patch.
  628.             The SetPatchA() function with the PATT_CreateTaskList tag
  629.             specified, must be called to allocate a TaskList.
  630.         PATERR_TaskListExists
  631.             PATT_CreateTaskList was specified, but there already
  632.             exists a TaskList.
  633.         PATERR_InvalidTaskList
  634.             PATT_CreateTaskList was specified with a wrong parameter
  635.  
  636.    NOTES
  637.     Using the TaskList feature provided by this function will increase
  638.     the stackusage of the patched function.
  639.  
  640.    BUGS
  641.  
  642.    SEE ALSO
  643.     InstallPatchTags(), Patch.h, PatchTags.h
  644. patch.library/WaitRemovePatch                   patch.library/WaitRemovePatch
  645.  
  646.    NAME
  647.     WaitRemovePatch -- Waits until it is possible to remove a patch.
  648.  
  649.    SYNOPSIS
  650.     Error = WaitRemovePatch( patch )
  651.     D0                 A0
  652.  
  653.     ULONG Error WaitRemovePatch( struct Patch * );
  654.  
  655.    FUNCTION
  656.     This function is obsolete from V2 on, use RemovePatchTags() instead.
  657.     It effectively calls the new function
  658.     RemovePatchTags(patch,  PATT_TimeOut, 0x7fffffff,
  659.                 PATT_DelayedExpunge, FALSE)
  660.  
  661.    INPUTS
  662.     patch = pointer to the patch structure or NULL for no action
  663.  
  664.    RESULT
  665.     Error = Errorcodes as defined in Patch.h.
  666.         (for more information see RemovePatchTags() )
  667.  
  668.    NOTES
  669.     Removing a patch routine can never be made absolutely save.
  670.     Although patch.library does anything possible to provide methods
  671.     to minimize the chance of a crash, there will always be a
  672.     slight chance.
  673.     So minimize the number of install and remove operations.
  674.  
  675.    BUGS (?)
  676.     This function will never return, if the patched library function
  677.     crashed for some reason.
  678.  
  679.    SEE ALSO
  680.     RemovePatchTags()
  681.  
  682.  
  683.